import type { FormField } from '@/stores/formDesigner'

const Desc: FormField = {
  id: null,
  name: 'IFormInput',
  nickName: '输入框',
  type: 'input',
  icon: 'IFormInput',
  parentId: null,
  slot: null,
  isShow: true,
  attrs: {
    // 基础属性
    type: 'text', // text, textarea, password, url, email, date, number, tel
    modelValue: '',
    placeholder: '请输入内容',
    clearable: false,
    showPassword: false,
    disabled: false,
    readonly: false,
    size: 'default', // large, default, small

    // 输入限制
    maxlength: undefined,
    minlength: undefined,
    showWordLimit: false,

    // 前缀和后缀
    prefixIcon: '',
    suffixIcon: '',
    prefix: '',
    suffix: '',

    // 验证
    validateEvent: true,

    // 自动完成
    autocomplete: 'off',

    // 其他
    tabindex: undefined,
    autofocus: false,
    form: undefined,
    label: '输入框',
    required: false,

    // 样式相关
    inputStyle: {},
    inputClass: '',

    // 事件
    onBlur: undefined,
    onFocus: undefined,
    onChange: undefined,
    onInput: undefined,
    onClear: undefined,
    onVisibleChange: undefined
  },
  style: {
    width: 200,
    height: 40,
    x: 0,
    y: 0,
  },
  validation: false,
}

export default Desc
